<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
//定义在api.php文件中 默认有api

//定义路由
Route::post('login','Api\LoginController@login');




Route::group(['prefix'=>'v1','namespace'=>'Api'],function(){
    Route::get('users',function(){
        return '124';
    }) ;

    //小程序登陆
    Route::post('wxlogin','LoginController@wxlogin');

    //用户授权信息入库
    Route::post('user/userinfo','UserController@userinfo');
    //获取用户信息
    Route::get('user/userinfo','UserController@getuserinfo');
});
